//
//  UIImage + Scale.swift
//  1026SwiftSinaWeiBo
//
//  Created by Apple on 15/11/10.
//  Copyright © 2015年 itcast. All rights reserved.
//

import UIKit

extension UIImage {

    ///等比缩放图片
    func displaySize() -> CGSize {
        
        let newWidth = UIScreen.width
        
        let oldWidth = size.width
        let oldHeight = size.height
        
        let newHeight = oldHeight / oldWidth * newWidth
        
        return CGSize(width: newWidth, height: newHeight)
    }
}
